function move(ele,obj,cb=function(){}){
    let k = 0
    let n = 0
    for(let key in obj){
        n++
        let timerId = setInterval(function(){
            let target = obj[key]
            let currentStyle = getStyle(ele,key) // 带px
            currentStyle = parseInt(currentStyle)
            let percent = (target - currentStyle)/20
            if(percent>0){
                percent = Math.ceil(percent)
            }else{
                percent = Math.floor(percent)
            }
            currentStyle = currentStyle + percent
            if(currentStyle === target){
                clearInterval(timerId)
                ele.style[key] = currentStyle + "px"
                k++
                if(n===k){
                    cb()
                }
            }else{
                ele.style[key] = currentStyle + "px"
            }
        },20)
    }
}



// 获取当前样式的函数
function getStyle(ele,attr){
    if(window.getComputedStyle){
        return window.getComputedStyle(ele)[attr]
    }else{
        return ele.currentStyle[attr]
    }
}